﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo7_1_1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int a = 10;
            int b = 11;
            Test(12);
            Console.ReadLine();

        }

        static void Test(int c) 
        {
            Task.Run(() => { Run1(); });
            Task.Run(() => { Run2(); });
            Task.Run(() => { Run3(); });
        }

        static void Run1() 
        {
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run1正在运行");
            Console.ReadLine();
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run1结束运行");
        }
        static void Run2()
        {
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run2正在运行");
            Console.ReadLine();
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run2结束运行");
        }
        static void Run3()
        {
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run3正在运行");
            Console.ReadLine();
            Console.WriteLine($"tid={Environment.CurrentManagedThreadId},Run3结束运行");
        }
    }
}
